/*
 * @Descripttion: 考题题库接口
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2021-05-13 20:14:31
 * @LastEditTime: 2021-05-17 13:23:15
 * @FilePath: \cscec-pms-admin\src\api\partyMasses\partyStudyInfo\questionBank\index.js
 */
import request from '@/utils/request2';
import { unionApiUrl } from '@/api/config.js';

/**
 * @description: 新增考题
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const insertSelective = data => {
  return request({
    url: `${unionApiUrl}/examQuestion/insertSelective`,
    method: 'post',
    data
  })
}
/**
 * @description: 分页查询
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const getPageExamQuestion = data => {
  return request({
    url: `${unionApiUrl}/examQuestion/getPageExamQuestion`,
    method: 'post',
    data
  })
}
/**
 * @description: 编辑考题
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const updateByPrimaryKeySelective = data => {
  return request({
    url: `${unionApiUrl}/examQuestion/updateByPrimaryKeySelective`,
    method: 'post',
    data
  })
}
/**
 * @description: 删除考题
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const deleteByPrimaryKey = data => {
  return request({
    url: `${unionApiUrl}/examQuestion/deleteByPrimaryKey`,
    method: 'post',
    data
  })
}
/**
 * @description: 获取试题分类列表
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const getExamTypeEnums = data => {
  return request({
    url: `${unionApiUrl}/examType/getExamTypeEnums`,
    method: 'get',
    params: data
  })
}

export {
  insertSelective,
  getPageExamQuestion,
  updateByPrimaryKeySelective,
  deleteByPrimaryKey,
  getExamTypeEnums
}